﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Shell;

namespace ch0p57ickz.OnTime
{
    public class OnTimeAppBar
    {
        private ApplicationBar _appBar = null;
        private static OnTimeAppBar _onTimeAppBar = null;

        public static ApplicationBar AppBar
        {
            get
            {
                if (_onTimeAppBar == null)
                {
                    _onTimeAppBar = new OnTimeAppBar(); 
                }
                return _onTimeAppBar._appBar;
            }
        }

        public OnTimeAppBar()
        {
            _appBar = new ApplicationBar();
            _appBar.IsMenuEnabled = true;
            _appBar.IsVisible = true;

            ApplicationBarIconButton addButton = new ApplicationBarIconButton(new Uri("/Images/appbar.add.rest.png", UriKind.Relative));
            addButton.Text = "Add";
            _appBar.Buttons.Add(addButton);
        }
    }
}
